package action;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import mgr.DBMgr;
import bean.BoardBean;

public class BoardReplyAction implements BoardAction {

	@Override
	public void execute(HttpServletRequest request, HttpServletResponse response) {
		BoardBean bean = (BoardBean) request.getAttribute("bean");
		DBMgr mgr = new DBMgr();
		boolean flag = mgr.reply(bean); //insert
		if(flag){
			try {
				response.sendRedirect("http://localhost/MVCBoard/list.bo");
			} catch (IOException e) {
				e.printStackTrace();
			}//try~catch
		}else{
			System.out.println("Error");
		}
	}//exe
}//class
